package com.wj.ch2.profile;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @program: wj_springBoot
 * @description: 测验
 * @author: wj
 * @create: 2021-10-08 14:17
 **/
public class Main {



    public static void main(String[] args) {

        AnnotationConfigApplicationContext context =new AnnotationConfigApplicationContext();
//        context.getEnvironment().setActiveProfiles("dev");
        context.getEnvironment().setActiveProfiles("prod");
        context.register(ProfileConfig.class);
        context.refresh();

        DeamBean bean = context.getBean(DeamBean.class);
        System.out.println(bean.getConcent());
        context.close();
    }
}
